package com.service;

import java.util.regex.Pattern;

public class Util {
    public static boolean isDouble(String str) {
        if (null == str || "".equals(str)) {
            return false;
        }
        Pattern containNumber = Pattern.compile(".*\\d");
        if (!containNumber.matcher(str).matches()) {
            return false;
        }
        Pattern pattern = Pattern.compile("^[-\\+]?[.\\d]*$");
        return pattern.matcher(str).matches();
    }
}
